<?php
namespace BWL\webshopBundle\Entity;

/**
 * Created by JetBrains PhpStorm.
 * User: leon
 * Date: 11/18/12
 * Time: 3:14 PM
 * To change this template use File | Settings | File Templates.
 */
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="shoppingCart")
 */
class ShoppingCart
{
  /**
   * @ORM\Id
   * @ORM\ManyToOne(targetEntity="User", inversedBy="shoppingCart")
   * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
   */
  protected $user;

  /**
   * @ORM\Id
   * @ORM\ManyToOne(targetEntity="Item", inversedBy="shoppingCarts")
   * @ORM\JoinColumn(name="item_id", referencedColumnName="id", nullable=false)
   */
  protected $item;

  /**
   * @ORM\Column(type="integer")
   */
  protected $count;



  public function setCount($count) {
    $this->count = $count;
  }

  public function getCount() {
    return $this->count;
  }

  public function setItem($item) {
    $this->item = $item;
  }

  public function getItem() {
    return $this->item;
  }

  public function setUser($user) {
    $this->user = $user;
  }

  public function getUser() {
    return $this->user;
  }
}
